<!doctype html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge;IE=11;IE=9;IE=8;">
    <meta charset="UTF-8">
    <title>套表目录</title>
    <script src="/report/js/bootstrap.js"></script>
    <style type="text/css">
    html, body {
	    height: 100%;
	    width: 100%;
	    margin: 0;
	}
	.biaoti {
	    width: 80%;
	    height: 20%;
	    position: relative;
	    top: 10%;
	    left: 12%;
	    font-size: 24px;
	    font-weight: bold;
	    float: left;
	}
	.mulu {
	    width: 80%;
	    height: 60%;
	    position: relative;
	    float: left;
	    left: 15%;
	    font-size: 14px;
	}
	span{
		float: left;
		width:100%;
		margin-bottom: 14px;
	}
</style>
</head>
<body>
	<div id = "biaotidiv" class = "biaoti"></div>
	<div id = "muludiv" class = "mulu"></div>
	<script type="text/javascript">
    	var formData = window.parent.getConditionValues();
    	var tables_id = window.parent.tables_id;
        formData["titleType"] = "1";
        $.post("/sys-report/getCoverData",{
        	tables_id: tables_id,
        	detailForm: encode64(JSON.stringify([formData]))
        }, function (jsonData) {
            var data = JSON.parse(jsonData.data);
        	var coverList = eval(data.coverList);
        	for ( var i = 0; i < coverList.length; i++) {
				var coverData = coverList[i];
				if(coverData.TITLE_TYPE == "2"){
                    var fontSize = 20;
                    if(!!coverData.FONT_SIZE) {
                        fontSize = coverData.FONT_SIZE;
                    }
					$('#biaotidiv').append($('<span style="font-size: ' + fontSize + 'px;">'+coverData.TITLE+'</span>'));
				}else{
                    var fontSize = 18;
                    if(!!coverData.FONT_SIZE) {
                        fontSize = coverData.FONT_SIZE;
                    }
					$('#muludiv').append($('<span style="font-size: ' + fontSize + 'px;">'+coverData.TITLE+'</span>'));
				}
			}
        }, 'json');
    </script>
</body>
